/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package pe.edu.sistemas.sse.entity;

import java.io.Serializable;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import org.hibernate.annotations.Proxy;

/**
 *
 * @author laptop-w8
 */
@Entity
@Table(name = "MEAP")
@Proxy(lazy = false)
public class Eap implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "CEAP")
    private long id_eap;
    @Column(name = "DNM_EAP")
    private String dnombre;
    @Column(name = "DCOD_EAP")
    private String dcodigo;
    @ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "CFAC", referencedColumnName = "CFAC", nullable = false)
    private Facultad facultad;
    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy = "eap")
    private Set<PlanEstudio> planesEstudio;
    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy = "eap")
    private Set<PromocionIngreso> promocionesIngreso;

    public long getId_eap() {
        return id_eap;
    }

    public void setId_eap(long id_eap) {
        this.id_eap = id_eap;
    }

    public String getDnombre() {
        return dnombre;
    }

    public void setDnombre(String dnombre) {
        this.dnombre = dnombre;
    }

    public String getDcodigo() {
        return dcodigo;
    }

    public void setDcodigo(String dcodigo) {
        this.dcodigo = dcodigo;
    }

    public Facultad getFacultad() {
        return facultad;
    }

    public void setFacultad(Facultad facultad) {
        this.facultad = facultad;
    }

    public Set<PlanEstudio> getPlanesEstudio() {
        return planesEstudio;
    }

    public void setPlanesEstudio(Set<PlanEstudio> planesEstudio) {
        this.planesEstudio = planesEstudio;
    }

    public Set<PromocionIngreso> getPromocionesIngreso() {
        return promocionesIngreso;
    }

    public void setPromocionesIngreso(Set<PromocionIngreso> promocionesIngreso) {
        this.promocionesIngreso = promocionesIngreso;
    }

}
